package org.ihelpuoo.orm.handler.dom;

import java.lang.reflect.Field;

import org.ihelpuoo.orm.IIIException;
import org.ihelpuoo.orm.ObjectRule;
import org.ihelpuoo.orm.handler.ObjectProcessor;
import org.ihelpuoo.orm.handler.SaveObjectFieldHandler;

public class EleSaveObjectFieldHandler extends SaveObjectFieldHandler
{

	public EleSaveObjectFieldHandler(ObjectProcessor beanHandler)
	{
		super(beanHandler);
	}

	@Override
	protected Object prepareSubSource(ObjectRule r, Field f, Object src) throws Exception
	{
		return ElementSequenceFieldUtils.prepareSubSource(r,f,src);
	}

	@Override
	protected void setObjectToSourceObject(ObjectRule br, Object src, Object obj)
			throws IIIException
	{
		processor.update(br,src,obj,null,null);
	}

}
